import React from 'react';
import "./index.less";
import {PlusOutlined} from "@ant-design/icons";
import {KfRapidUploadProps} from "kf-web-library";
import KfMaterialRapidUpload from "@/components/KfMaterialUpload/KfMaterialRapidUpload";
import {MaterialType} from "@/components";


export interface KfMaterialPicturesWallUploadProps extends Omit<KfRapidUploadProps, 'uploadButton' | 'listType'> {
  materialType: MaterialType;
}


const KfMaterialPicturesWallUpload: React.FC<KfMaterialPicturesWallUploadProps> = (props) => {

    const {
        maxCount = 9,
        ...rapidUploadProps
    } = props;

    const uploadButton = (
        <div>
            <PlusOutlined/>
            <div className="ant-upload-text">上传</div>
        </div>
    );

    return (
        <KfMaterialRapidUpload
            {...rapidUploadProps}
            maxCount={maxCount}
            className={"kf-pictures-wall-uploader"}
            listType="picture-card"
            triggerElement={uploadButton}
        >

        </KfMaterialRapidUpload>
    );
};

export default KfMaterialPicturesWallUpload;
